use serde::{Deserialize, Serialize};
use struct_field_names_as_array::FieldNamesAsSlice;

// 产品分类详情数据
#[derive(sqlx::FromRow, Deserialize, Serialize, FieldNamesAsSlice)]
pub struct TaxonDetail { 
    pub id: i64,
    // 名称
    pub name: String, 
    // 图标
    pub image: String,
    // 数量
    pub num: i64,
    // 排序
    pub order_by: i64
}

// 产品分类列表行数据
#[derive(sqlx::FromRow, Clone, Deserialize, Serialize, FieldNamesAsSlice)]
pub struct TaxonRow { 
    pub id: i64,
    pub name: String, 
    pub image: String,
    pub num: i64
}
